package com.example.customannotation.IDempotent;

import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

/**
 * Created with IntelliJ IDEA 2023.
 * Description:
 * User: homechen
 * Date: 2024-04-24
 * Time: 20:53
 */
@RestController
public class TestController {
    @PostMapping("/order")
    @Idempotent(requestId = "orderId")
    public String placeOrder(@RequestParam("orderId") String orderId) {
        // 业务逻辑
        return null;
    }
}
